export default function ({ app: { $axios, $cookies } }) {
	$axios.defaults.baseURL = process.env.baseUrl
	$axios.defaults.withCredentials = true
	$axios.defaults.crossDomain = true
	$axios.defaults.timeout = 30000
	// $axios.interceptors.request.use(config => {
	// 	return config
	// })
	$axios.interceptors.response.use(response => {
		if (/^[4|5]/.test(response.status)) {
			return Promise.reject(response.statusText)
		}
		return response.data
	})
}